var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var http = require('http');


var port = 8066; //服务端口
var path = require('path');
var controller = require("./controller/controller.js")
var router = express.Router();
app.use(bodyParser.json({ type: 'application/*+json' }))
app.use(bodyParser.urlencoded({ extended: false }))
//后台接口
app.get('/api/ttt', controller.ttt);


//前端页面
app.use('/document/vartifyHouse', express.static(path.join(__dirname, 'public/document/index.html')));
app.use('/master', express.static(path.join(__dirname, 'public/master')));

//后端接口
app.post('/api/getindexlist', controller.getindexlist)

app.listen(port, function () {
  console.log("Server Listening on http://127.0.0.1:" + port)
})

